 <!DOCTYPE html>
 <html lang="en">
 <head>
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
     <title>Document</title>
     <script src="jquery-1.11.3.min.js"></script>
 </head>
 <body>
    <div class="container">
        <div class="top">
            <span>正在热映</span>
            <span class="more">更多</span>
        </div>
        <div class="item">
            <ul class="ul">
                <div class="y_loading_easy" id="J_loadmore">努力加载中...</div>
            </ul>
        </div>
    </div>
<script>
 $(function () {
 //滚动加载
    var stop = true;
    var start = 0;
    $.ajaxSetup({async:false});
    function getData(url){
        $.ajax({
            type:"get",//跨域访问时只能用get
            url:url,//要访问的api地址
            dataType:"jsonp",
            success:function(data){
                var d = data.subjects;
                var html = '';
                for(i in d){
                    html += '<li>'
                    +'<span class="img-span"><img src="'+d[i].images.large+'">'+'</span>'
                    +'<p class="name">'+d[i].title+'</p>'
                    +'</li>'
                    pageindex++;
                }
                stop = true;

                $('.ul').append(html);
            },
        });
    }
    getData('http://spc.chooseauto.com.cn/api/user/getpostlistbycontentidM.aspx?contentid=100821290&orderby=1&pageindex=1');
    $(window).scroll(function(){
        var url = "'http://spc.chooseauto.com.cn/api/user/getpostlistbycontentidM.aspx?contentid=100821290&orderby=1&pageindex=1";
        var totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop());
        if($(document).height() <= totalheight +120){
            if(stop == true){
                stop = false;
                $('#j_loadmore').addClass('enabled');
                getData(url);
            }
        }
    })
})
</script>

 </body>
 
 </html>